# xmlutil.py
# Original Author: Amar Zumkhawala (amarzumkhawala@gmail.com)
# Project URL - http://code.google.com/p/feedflare-categories
# Distributed under Apache License 2.0
#
# $Revision: 7 $, $Date: 2008-12-28 01:00:43 -0500 (Sun, 28 Dec 2008) $
# $Author: amarzumkhawala $

"""
Helper routines for dom manipulation
"""

import logging

"""Get the text content of a node"""
def getText(parent):
  nodelist = parent.childNodes
  rc = ""
  for node in nodelist:
    if node.nodeType == node.TEXT_NODE:
      rc = rc + node.data
    if node.nodeType == node.CDATA_SECTION_NODE:
      rc = rc + node.data
  return rc
